package com.ybkj.o2o.zhuanxian.service;

import com.ybkj.o2o.zhuanxian.entity.Line;

import java.util.List;

public interface LineService {

  Line create(Line line);

  Line findById(Long id, String appKey);

  int deleteLine(Long id, String appKey);

  List<Line> findByParam(Long companyId, String companyName, String name, String startCity,
      String startAddress, String endCity, String endAddress, Integer limit, Integer rows,
      String appKey);
  
  List<Line> findLineByParams(
      String keyWord, Integer limit, Integer rows, String appKey);
  
  List<Line> findEndByStart(
	      String startCity, String startAddress, Integer limit, Integer rows, String appKey);

  Long countLineByParams(String keyWord, String appKey);
  
  Long countLineByStart(String startCity, String startAddress, String appKey);
  
  Long countByParam(Long companyId, String companyName, String name, String startCity,
      String startAddress, String endCity, String endAddress, String appKey);

  int update(Line line);

  List<Line> findByIds(List<Long> lineIds);

  List<Line> findAll(String city, String appKey);

  List<Line> findLineByCompany(Long companyId, String city, String appKey);

  List<Line> findByCityAndAddress(Long companyId, String startCity, String startAddress,
      String endCity, String endAddress);

  List<Line> findStartEndByLine(String startCity, String endCity, String appKey);

  List<Line> findByCompany(Long companyId, String appKey);

  List<Line> queryLineByStartCity(String startCity,String appKey);

  List<Line> queryEndLineBySatrt(String startCity, String startAddress,
      String endCity, String appKey);

  Long countByAddress(Long companyId, String startCity, String startAddress, String endCity,
      String endAddress,String appKey);

  List<Line> findByAddress(Long companyId, String startCity, String startAddress, String endCity,
      String endAddress, String appKey);

  List<Line> querylineByCity(String city, String appKey);

  List<Line> lineIsExist(String startCity, String startAddress, String endcity,
      String endAddress, String appKey);

  List<Line> findLineByName(String name, String appKey, Long companyId);
}
